diff options
Diffstat (limited to 'data.c')
| -rw-r--r-- | data.c | 14 |
1 files changed, 14 insertions, 0 deletions
| @@ -1358,6 +1358,20 @@ int pending_count(snac *user) | |||
| 1358 | } | 1358 | } |
| 1359 | 1359 | ||
| 1360 | 1360 | ||
| 1361 | int is_msg_mine(snac *user, const char *id) | ||
| 1362 | /* returns true if a post id is by the given user */ | ||
| 1363 | { | ||
| 1364 | int ret = 0; | ||
| 1365 | |||
| 1366 | if (xs_is_string(id)) { | ||
| 1367 | xs *s1 = xs_fmt("%s/", user->actor); | ||
| 1368 | ret = xs_startswith(id, s1); | ||
| 1369 | } | ||
| 1370 | |||
| 1371 | return ret; | ||
| 1372 | } | ||
| 1373 | |||
| 1374 | |||
| 1361 | /** timeline **/ | 1375 | /** timeline **/ |
| 1362 | 1376 | ||
| 1363 | double timeline_mtime(snac *snac) | 1377 | double timeline_mtime(snac *snac) |